package com.huiyuan.service;

import com.huiyuan.common.Page;
import com.huiyuan.common.PageVo;
import com.huiyuan.domain.Order;

/**
 * @author huiyuan080
 * @data 2023/5/2
 * @apiNote
 */
public interface OrderService {


    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    /**
     * 添加订单
     *
     * @param userId
     * @param bicycleId
     */
    int useBicycle(Integer userId, Integer bicycleId);

    /**
     * 分页查询会员用车的记录
     * @param page
     * @return
     */
    PageVo getMemberOrder(PageVo page, Integer userId);

    /**
     * 会员锁车还车
     * @param userId
     * @param id
     * @return
     */
    int backBicycle(Integer userId, Integer id);
}
